package com.xuelang.pipeline.artifact.app.nexus3v1.exception;

import com.xuelang.pipeline.artifact.app.nexus3v1.xo.ApiResponseXO;

/**
 * @author xiwen.zxg
 * @since 2024/7/10
 */
public class ArtifactException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private ApiResponseXO response;

    public ApiResponseXO getApiResponse() {
        return response;
    }

    public ArtifactException(ApiResponseXO response) {
        super(response.getMessage());
        this.response = response;
    }
    public ArtifactException(String message) {
        super(message);
    }
    public ArtifactException(String message, ApiResponseXO response) {
        super(message);
        this.response = response;
    }

    public ArtifactException(String message, Throwable cause) {
        super(message, cause);
    }

    public ArtifactException(String message, ApiResponseXO response, Throwable cause) {
        super(message, cause);
        this.response = response;
    }

}
